(function(){
	Ext.onReady(function(){ 
		// 定义模型
		Ext.define("Person", {
			extend : 'Ext.data.Model',
			fields :[
				{name:'name',type:'string'},
				{name:'age',type:'int'},
				{name:'email',type:'string'}
			]
		});	
		//定义store
		var users = Ext.create('Ext.data.Store',{
			model:'Person',
			proxy:{
				type:'ajax',
				reader:'json',
				url:'/laoluo-erp/lesson!AjaxTest.action'
			},
			autoload:true
		});
		
		users.load(function(records, operation, success){
				Ext.Array.each(records,function(item){
					alert(item.get('name'));
				});
		});
	});
})();